<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    img {
        width: 200px;
        height: 200px;
        position: absolute;
        left: 0;
        top: 0;
    }
</style>

<body>
    <div>
        <img src="../img/girl/girl (8).jpg" alt="">
        <img src="../img/girl/girl (9).jpg" alt="">
    </div>
</body>
<script>
    var img1 = document.getElementsByTagName('img')[0];
    var img2 = document.getElementsByTagName('img')[1];


    function move() {
        var timer = null;
        timer = setInterval(function () {
            var random1 = Math.random() * 500;
            var random2 = Math.random() * 2000;
            var random3 = Math.random() * 1000;
            var random4 = Math.random() * 2000;


            console.log(random1);
            console.log(random2);


            img1.style.left = random1 + 'px';
            img1.style.top = random2 + 'px';


            img2.style.left = random4 + 'px';
            img2.style.top = random3 + 'px';

        }, 10)
    }
    move();
</script>

</html>